package com.wwdx.model.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author liguoliang
 * @date 2018/4/20 17:27
 */
public abstract class BaseActivityDTO {

    @Data
    public static class GiveOneDTO implements Serializable {
        @JsonIgnore
        private String phase;
        /**
         * 期数
         */
        private Integer num;
        /**
         * 类型 1书籍2会员
         */
        private Integer type;
        private List<WwdxBookBusinessDTO> book_list;
    }

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class GiveOneBusinessDTO implements Serializable {
        /**
         * 领取人
         */
        private String unionid;
        /**
         * 分享人
         */
        private String unionid2;
        /**
         * 渠道
         */
        private String channel;
        /**
         * 书籍ID
         */
        private Long bookid;
        /**
         * 书籍领取状态:未领取(bookid)、已购买(bookid+true)、已领取(bookid+false)
         */
        private String bookFlag;
    }

    /**
     * 商户分销收入统计
     */
    @Data
    public static class StatisticsMerchantIncomeDTO implements Serializable,Cloneable{

        private String merchant_id;
        private Long product_id;
        private String date;
        private Long pvCount;
        private Long uvCount;
        private Long userCount;
        private Integer scale;
        private BigDecimal price;
        private BigDecimal priceCount;

        @Override
        public Object clone()  {
            try {
                return super.clone();
            }catch (CloneNotSupportedException e){
                e.printStackTrace();
                return null;
            }
        }
    }
}
